package com.action
{
	import com.stage.item.Player;

	public class BaseAction
	{
		private var _callback:Function; // 动作结束的回调
		protected var _dir:int;
		protected var _player:Player;
		
		public function BaseAction(player:Player)
		{
			_player = player;
		}
		
		public function start(dir:int = 1):void{
			_dir = dir;
		}
		
		protected function enterFrame():void{ // 帧监听函数，资源动画之外的一些动画处理
			
		}
		
		public function end():void{
			if(_callback){
				_callback(this);
			}
		}
		
		public function set callback(value:Function):void
		{
			_callback = value;
		}
		
		public function get player():Player{
			return _player;
		}
		
		public function get dir():int{
			return _dir;
		}
	}
}